<?php $this->load->view("general/header");?>
<script src="<?php echo base_url();?>js/hitung.js"></script>
<div id="create_invoice" class="page_">
    <div class="form">              
        <div class="form_header"><a href="<?php echo site_url('invoice/index');?>">Daftar Invoice</a> &rarr; Edit Invoice <?php echo $invoice['0']['invoice_no'];?> PT: <?php echo $invoice['0']['pt_name'];?></div>
        
        
        <div class="content_dataZ">
        <form method="post" action="<?php echo site_url("invoice/edit");?>">
            <table id="invoadd">
            	
            	<tr>
                	<td colspan="6" width="50%"><strong>General Info</strong></td>
                    <td colspan="6" width="50%"><strong>Customer & Order Info</strong></td>
                </tr>
                <tr >
                	<td id="subcontentf">Kode:</td>
                    <td><input type="text" readonly="readonly" id="noInvoice" name="noInvoiceR"
                    	value="<?php echo $invoice['0']['invoice_no'];?>" />
                    </td>
                    <td id="subcontents">Staff Edit:</td>
            		<td><input type="text" disabled="disabled"
                    	value="<?php echo get_username($this->session->userdata("user_id"));?>" />
                    </td>
                     <td>
                    	
                    </td>
                    <td>
                    	
                    </td>
                    
                    <td id="subcontentf">Pilih PT:</td>
                    <td>
                    	<select   id="pt" name="ptName" onchange="javascript:invoViewCustomerPt(
                                                        '#pt', '#content_datax', '0')"  style="width: 300px">
                            <option value="">::: Select :::</option>
                            <option value="0">Perorangan</option>
                            <?php foreach ($perusahaan as $perusahaan1){
                            	if($perusahaan1['pt_id']==$invoice['0']['pt_id']){?>
                                	<option selected="selected" value="<?php echo $perusahaan1['pt_id'];?>"><?php echo $perusahaan1['pt_name'];?></option>			
                            	<?php }
								else{?>
                                	<option value="<?php echo $perusahaan1['pt_id'];?>"><?php echo $perusahaan1['pt_name'];?></option>
                                <?php }?>    
							<?php }?>
                        </select>                      
                    </td>
                    <td>Pilih Customer:</td>
                    <td>
                    	<div id="content_datax">
                        	<select  id="customer" name="customer" >
                                <option value="<?php echo $invoice['0']['customer_id'];?>" selected="selected"><?php echo $invoice['0']['customer_name'];?></option>
                                
                        	</select>
                        </div>
                    </td>
                    <td>
                    	<img src="<?php echo base_url();?>image_tinymce/add.jpg" id="refreshimg"/>
                    </td>
                   
            	</tr>
                <tr>
                	<td id="subcontentf">Mata Uang:</td>
                    <td colspan="3"><input type="text" value="<?php echo $invoice['0']['currency'];?>" name="mataUang"/></td>
                    <td></td>
                    <td></td>
                    <td id="subcontentf">Order No.:</td>
                    <td colspan="3"><input type="text" name="order" value="<?php echo $invoice['0']['orderno'];?>"/></td>
                    <td></td>
                </tr> 
                <tr>
                	<td id="subcontentf">Tanggal:</td>
                    <td><input type="text" value="<?php $convert = strtotime($invoice['0']['invoice_date']); $tampil = date('d-M-Y',$convert);echo $tampil;?>" class="txtdate2" name="dateNow" id="datenow" onchange="javascript:AddDays(14)"/></td>
                    
                    <td>Due by:</td>
                    <td><input type="text" value="<?php $convert1 = strtotime($invoice['0']['duedate']); $tampil1 = date('d-M-Y',$convert1);echo $tampil1;?>" class="txtdate2" name="dateDue" id="datedue1"/></td>
                    <td></td>
                    <td></td>
                    <td id="subcontentf">Sales Person:</td>
                    <td colspan="3"><select name="salesPerson">
                         
                         <?php foreach ($staff as $staff1){?>
                         	<?php if($staff1['user_id']==$invoice['0']['uganda']){?>
                            	<option selected="selected" value="<?php echo $staff1['user_id'];?>"><?php echo $staff1['name'];?></option>
                         	<?php }else{?>
                            	<option value="<?php echo $staff1['user_id'];?>"><?php echo $staff1['name'];?></option>
                            <?php }?>
						 <?php }?>	
                     </select></td>
                     <td>
                    	<img src="<?php echo base_url();?>image_tinymce/add.jpg" id="refreshimg"/>
                    </td>
                    
                </tr>
                <tr>
                	<td colspan="6" width="50%"><strong>Delivery Info</strong></td>
                    <td colspan="6" width="50%"><strong>Payment Info</strong></td>
                </tr>
                <tr>
                	<td id="subcontentf">Delivery To:</td>
                    <td colspan="4">
                    	<div id="content_deliv">
                        	<select  id="shipto" name="shipto" >
                            	<?php if($invoice['0']['deliv']==0){;?>
                                	<option value="" selected="selected">::: Select :::</option>
                                <?php }else{?>
									<option value="<?php echo $invoice['0']['delivid'];?>" selected="selected"><?php echo $invoice['0']['delivname'];?></option>
								<?php }?>
                                
                        	</select>
                        </div>
                    </td>
                    <td>
                    	<img src="<?php echo base_url();?>image_tinymce/add.jpg" id="refreshimgD"/>
                    </td>
                    
                    <td id="subcontentf">Bill To:</td>
                    <td colspan="3">
                    	<div id="content_bill">
                        	<select  id="billto" name="billto" >
                              <?php if($invoice['0']['bill']==0){;?>
                                	<option value="" selected="selected">::: Select :::</option>
                                <?php }else{?>
									<option value="<?php echo $invoice['0']['billid'];?>" selected="selected"><?php echo $invoice['0']['billname'];?></option>
								<?php }?>
                        	</select>
                        </div>	
                    </td>
                    <td>
                    	<img src="<?php echo base_url();?>image_tinymce/add.jpg" id="refreshimgB"/>
                    </td>
                    
                
                </tr>
                <tr>
                	<td id="subcontentf">Delivery Date:</td>
                    <td><input type="text" name="delivDate" value="<?php echo date("d-M-Y");?>" class="txtdate2" /></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td id="subcontentf">Payment Terms:</td>
                    <td colspan="3">
                    	<div id="paytermPlace">
                        	<select  id="payterm" name="payterm" onchange="javascript:AddDays(14)">
                            	
                                <option value="" >::: Select :::</option>
                                
                               		<?php foreach ($payterm as $payterm1){?>
                                        	<?php if($payterm1['desc']==$invoice['0']['term']){?>
                                	 <option selected="selected" value="<?php echo $payterm1['days'];?>">
										<?php echo $payterm1['desc']. " "; if($payterm1['desc']!="COD"){echo "hari";}?></option>
                            	<?php }
								else{?>
                                	<option value="<?php echo $payterm1['days'];?>">
										<?php echo $payterm1['desc']. " "; if($payterm1['desc']!="COD"){echo "hari";}?></option>
                                <?php }?> 
                                    <?php }?>
                        		
                            </select>
                        </div>	
                    </td>
                    <td>
                    	<!--<a href onClick="window.open('<?php /*echo site_url('invoice/payAdd');*/?>','windowname','width =700,height=250, scrollbars=no')"><img src="<?php /* base_url();*/?>image_tinymce/add.jpg" id="refreshimg"/></a>-->
                        <!--<a href onClick="window.open('<?php /*echo site_url('invoice/payAdd');*/?>','windowname','width =700,height=250, scrollbars=no')"><img src="<?php /* base_url();*/?>image_tinymce/add.jpg" id="refreshimg"/></a>-->
                       	<img src="<?php echo base_url();?>image_tinymce/add.jpg" id="refreshimgX"/>
                    </td>
                    
                </tr>
                <tr>
                	<td id="subcontentf">Delivery Term:</td>
                    <td colspan="3"><input type="text" name="delivTerm" value="<?php echo $invoice['0']['delivterms']?>"/></td>
                    <td></td>
                    <td></td>
                    <td id="subcontentf">Payment Method:</td>
                    <td colspan="3"><input type="text" name="payMethod" value="<?php echo $invoice['0']['paymethod']?>"/></td>
                 </tr>
                 
                 <tr >
                 	<td colspan="12" valign="top" id="itemplace">
                    	<div id="itemshown" class="itemShowClass">
                    	<table id="itemShow">
                        	
                            <col width="50px" /><!--select-->
                            <col width="30px" /><!--sq-->
                            <col width="100px" /><!--kode-->
                            <col width="200px" /><!--desc-->
                            <col width="100px" /><!--up-->
                            <col width="30px" /><!--prd-->
                            <col width="120px" /><!--amt-->
                            <col width="30" /><!--disc-->
                            <col width="80px" /><!--totaldisc-->
                            <col width="20px" /><!--tax1-->
                            <col width="20px" /><!--tax2-->
                            <col width="110px" /><!--final-->
                            	<tr>
                                <td></td>
                                <td></td>
                                
                               
                                
                                <td>Kode Barang</td>
                                <td>Deskripsi</td>
                                <td>Unit Price</td>
                                <td>Prd</td>
                                <td>Amount</td>
                                <td>Disc %</td>
                                <td>Disc Amt</td>
                                <td>Tax 1</td>
                                <td>Tax 2</td>
                                <td>Final Amt</td>
                                
                            	</tr>
                            	<?php $ikan=0;$noi = 1; $finaltotal = 0; $totaltax=0;$disctot=0;$totaltax1=0;$totaltax2=0;foreach($item as $item1){?>
                            	<tr id="baris_<?php echo $noi?>">
                                	
                                	<!--<td><p><label for="p_scnts"><input type="text" id="p_scnt" size="20" name="p_scnt" value="" placeholder="Input Value" /></label></p></td>-->
                                   	<?php   $ikan=1;$subtotal= $item1['harga']*$item1['prd'];
											$discamt = $subtotal * $item1['disc']/100;
											$finalsub= $subtotal - $discamt;
											if(($item1['tax1']=="on")&&($item1['tax2']=="on")){
												$jumtax1 =$finalsub *0.1;
												
												$finalreal  = $finalsub +($finalsub *0.1);
												$jumtax2 =$finalreal*0.02;
												$finalreal =  $finalreal - $finalsub*0.02;
												
											}else if(($item1['tax1']=="on")&&($item1['tax2']==0)){
												$jumtax1 =$finalsub *0.1;
												
												$finalreal  = $finalsub +($finalsub *0.1);
												$jumtax2 =0;
												
												
												
											}else if(($item1['tax1']==0)&&($item1['tax2']=="on")){
												$jumtax1 =0;
												
												$finalreal  = $finalsub;
												$jumtax2 =$finalreal*0.02;
												$finalreal =  $finalreal - $finalreal*0.02;
												
												
											}else if(($item1['tax1']==0)&&($item1['tax2']==0)){
												$jumtax1 =0;
												
												$jumtax2 =0;
												$finalreal =  $finalsub;
											}
											$finaltotal = $finalreal + $finaltotal;
											$totaltax2 = $jumtax2 +$totaltax2;
											$totaltax1 =$jumtax1+ $totaltax1;
											$disctot = $discamt+$disctot;
									?>
                                    <td><input type="button" value="Hapus" id="delrow_1" onclick="javascript:removetr(<?php echo $noi;?>)" /></td>
                                    <td><a href="#" id="pilihBarangApa">Select</a></td>
                                   
                                    
                                    <td><input type="text" class="brgList" id="kodebrg_<?php echo $noi?>" name="kodebrg_<?php echo $noi?>" value="<?php echo $item1['brg_id'];?>"/><input type="text" class="brgList" id="kodebrgprt_<?php echo $noi?>" name="kodebrgprt_<?php echo $noi?>" style="display:none" value="<?php echo $item1['brg_id'];?>"/></td>
                                    
                                    <td><input type="text" class="brgList" id="descbrg_<?php echo $noi?>" name="descbrg_<?php echo $noi?>" value="<?php echo $item1['desc'];?>"/></td>
                                    
                                    <td><input type="text" class="brgList" style="text-align:right" id="hargabrg_<?php echo $noi?>"  name="hargabrg_<?php echo $noi?>" value="<?php echo $item1['harga'];?>" onkeyup="javascript:quantity(<?php echo $noi?>)" size="11"/></td>
                                    
                                    <td><input type="text" class="brgList" id="q_<?php echo $noi?>" name="q_<?php echo $noi?>" value="<?php echo $item1['prd'];?>" size="3" onkeyup="javascript:quantity(<?php echo $noi?>)"/></td>
                                   
                                    <td><input type="text" class="brgList" style="text-align:right" id="amount_<?php echo $noi?>" disabled="disabled" value="<?php echo $subtotal;?>" size="11"/></td>
                                    
                                    <td><input type="text" class="brgList" id="disc_<?php echo $noi?>" name="disc_<?php echo $noi?>" value="<?php echo $item1['disc'];?>" onkeyup="javascript:hitungjmldisc(<?php echo $noi?>)" size="4"/></td>
                                    
                                    <td><input type="text" class="brgList" id="jumlahdisc_<?php echo $noi?>"   value="<?php echo $discamt;?>" onkeyup="javascript:hitungdisc(<?php echo $noi?>)" size="5"/></td>
                                    
                                    <td><input type="checkbox" class="brglist" id="tax1_<?php echo $noi?>" name="tax1_<?php echo $noi?>" onclick="javascript:quantity(<?php echo $noi?>)" <?php if($item1['tax1']=="on"){?> checked="checked" <?php } ?>/><input type="text" class="brglist" id="jumtax1_<?php echo $noi?>" name="jumtax1_<?php echo $noi?>" value="<?php echo $jumtax1;?>" style="display:none"/></td>
                                    
                                    <td><input type="checkbox" class="brglist" id="tax2_<?php echo $noi?>" name="tax2_<?php echo $noi?>" onclick="javascript:quantity(<?php echo $noi?>)" <?php if($item1['tax2']=="on"){?> checked="checked" <?php } ?>/><input type="text" class="brglist" id="jumtax2_<?php echo $noi?>" name="jumtax2_<?php echo $noi?>" value="<?php echo $jumtax2;?>" style="display:none"/></td>
                                    
                                    <td><input type="text" class="brgList" style="text-align:right"  id="finalamt_<?php echo $noi?>" disabled="disabled" value="<?php echo $finalreal;?>" size="12"/></td><input type="text" value="3" name="counter" id="counter" style="display:none"/>
                                </tr>
                               
                                <?php $noi++; }?>
                              	<?php if ($ikan==0){?>	
									<tr id="baris_1">
                                	
                                	<!--<td><p><label for="p_scnts"><input type="text" id="p_scnt" size="20" name="p_scnt" value="" placeholder="Input Value" /></label></p></td>-->
                                   		<td><input type="button" value="Hapus" id="delrow_1" onclick="javascript:removetr(1)" /></td>
                                        <td><a href="#" id="pilihBarangApa">Select</a></td>
                                        
                                        
                                        
                                        
                                        <td><input type="text" class="brgList" id="kodebrg_1" name="kodebrg_1"/><input type="text" class="brgList" id="kodebrgprt_1" name="kodebrgprt_1" style="display:none"/></td>
                                        
                                        <td><input type="text" class="brgList" id="descbrg_1" name="descbrg_1"/></td>
                                        <td><input type="text" class="brgList" style="text-align:right" id="hargabrg_1"  name="hargabrg_1" onkeyup="javascript:quantity(1)" size="11"/></td>
                                        <td><input type="text" class="brgList" id="q_1" name="q_1" size="3" onkeyup="javascript:quantity(1)"/></td>
                                       
                                        <td><input type="text" class="brgList" style="text-align:right" id="amount_1" disabled="disabled" size="11"/></td>
                                        <td><input type="text" class="brgList" id="disc_1" name="disc_1" onkeyup="javascript:quantity(1)" size="4"/></td>
                                        <td><input type="text" class="brgList" id="jumlahdisc_1"  disabled="disabled" size="5"/></td>
                                        <td><input type="checkbox" class="brglist" id="tax1_1" name="tax1_1" onclick="javascript:taxing1(1)"/><input type="text" class="brglist" id="jumtax1_1" name="jumtax1_1" style="display:none"/></td>
                                        <td><input type="checkbox" class="brglist" id="tax2_1" name="tax2_1" onclick="javascript:taxing2(1)"/><input type="text" class="brglist" id="jumtax2_1" name="jumtax2_1" style="display:none"/></td>
                                        <td><input type="text" class="brgList" style="text-align:right"  id="finalamt_1" disabled="disabled" size="12"/></td><input type="text" value="1" name="counter" id="counter" style="display:none"/>
                                	</tr>
                 
								<?php }else{ ?>
                                	<tr id="baris_<?php echo $noi;?>">
                                	
                                	<!--<td><p><label for="p_scnts"><input type="text" id="p_scnt" size="20" name="p_scnt" value="" placeholder="Input Value" /></label></p></td>-->
                                   		<td><input type="button" value="Hapus" id="delrow_1" onclick="javascript:removetr(<?php echo $noi;?>)" /></td>
                                        <td><a href="#" id="pilihBarangApa">Select</a></td>
                                        
                                        
                                        
                                        
                                        <td><input type="text" class="brgList" id="kodebrg_<?php echo $noi?>" name="kodebrg_<?php echo $noi?>"/><input type="text" class="brgList" id="kodebrgprt_<?php echo $noi?>" name="kodebrgprt_<?php echo $noi?>" style="display:none"/></td>
                                        
                                        <td><input type="text" class="brgList" id="descbrg_<?php echo $noi?>" name="descbrg_<?php echo $noi?>"/></td>
                                        <td><input type="text" class="brgList" style="text-align:right" id="hargabrg_<?php echo $noi?>"  name="hargabrg_<?php echo $noi?>" onkeyup="javascript:quantity(<?php echo $noi?>)" size="11"/></td>
                                        <td><input type="text" class="brgList" id="q_<?php echo $noi?>" name="q_<?php echo $noi?>" size="3" onkeyup="javascript:quantity(<?php echo $noi?>)"/></td>
                                       
                                        <td><input type="text" class="brgList" style="text-align:right" id="amount_<?php echo $noi?>" disabled="disabled" size="11"/></td>
                                        <td><input type="text" class="brgList" id="disc_<?php echo $noi?>" name="disc_<?php echo $noi?>" onkeyup="javascript:quantity(<?php echo $noi?>)" size="4"/></td>
                                        <td><input type="text" class="brgList" id="jumlahdisc_<?php echo $noi?>"  disabled="disabled" size="5"/></td>
                                        <td><input type="checkbox" class="brglist" id="tax1_<?php echo $noi?>" name="tax1_<?php echo $noi?>" onclick="javascript:quantity(<?php echo $noi?>)"/><input type="text" class="brglist" id="jumtax1_<?php echo $noi?>" name="jumtax1_<?php echo $noi?>" style="display:none"/></td>
                                        <td><input type="checkbox" class="brglist" id="tax2_<?php echo $noi?>" name="tax2_<?php echo $noi?>" onclick="javascript:quantity(<?php echo $noi?>)"/><input type="text" class="brglist" id="jumtax2_<?php echo $noi?>" name="jumtax2_<?php echo $noi?>" style="display:none"/></td>
                                        <td><input type="text" class="brgList" style="text-align:right"  id="finalamt_<?php echo $noi?>" disabled="disabled" size="12"/></td><input type="text" value="<?php echo $noi?>" name="counter" id="counter" style="display:none"/>
                                	</tr>
                                <?php }?>
                        </table>
                        </div>
                    </td>
                 </tr>   
                 
                 <tr>
                 	<td colspan="12">
                        <table width="100%">
                        	<tr>
                           	 	<td></td><td></td><td></td><td></td></td><td></td><td></td>
                                <td id="subcontentf">Materai</td>
                                <td><input type="text"  name="materai" id="materai" value="<?php echo $invoice['0']['materai']?>" onkeyup="javascript:quantity(1)" style="text-align:right"/></td>
								
                                
                                
                            </tr>
                            <tr>
                                <td><strong>Summary</strong></td>
                            </tr>
                            <tr>
                                <td id="subcontentf">Discount Total:</td>
                                <td><input type="text" disabled="disabled" id="discountTotal" name="discountTotal" value="<?php echo $disctot;?>" style="text-align:right"/></td>
                                <td>Total Tax 1</td>
                                <td><input type="text" value="<?php echo $totaltax1;?>" name="tax1total" id="tax1total"  readonly="readonly" style="text-align:right" disabled="disabled"/></td>
                                <td>Total Tax 2</td>
                                <td><input type="text" value="<?php echo $totaltax1;?>" name="tax2total" id="tax2total" readonly="readonly" style="text-align:right" disabled="disabled"/></td>
                                <?php $finaltotal = $finaltotal +$invoice['0']['materai'];?>
                                <td id="subcontentf">Total:</td>
                                <td><input type="text" readonly id="subTotal" name="subTotal" style="text-align:right" value="<?php echo $finaltotal;?>"/></td>
                               
                            </tr>
                            <tr>
                                <td></td><td></td><td></td><td></td></td><td></td><td></td>
                                <td id="subcontentf">Bayar</td>
                                <td><input type="text"  name="deposit" id="deposit" name="deposit"  placeholder="0.00" style="text-align:right" onkeyup="javascript:kurangDeposit()" value="<?php echo $invoice['0']['bayar']?>"/></td>
                            </tr>
                            <tr>
                           	 	<td></td><td></td><td></td><td></td></td><td></td><td></td>
                                <td id="subcontentf">Amt Due</td>
                                <?php $kurang = $finaltotal - $invoice['0']['bayar'];?>
                                <td><input type="text"  name="totalAkhir" id="totalAkhir" disabled="disabled" value="<?php echo $kurang?>" style="text-align:right"/></td>
								
                                
                                
                            </tr>
                            <tr>
                            	<td id="subcontentf" ></td>
                                <td><input type="text" value="0.00"  id="delivery" style="display:none"/></td>
                            	
                                <td id="subcontentf"></td>
                                <td><input type="text" disabled="disabled"  id="totalreal" name="totalreal" style="display:none" value="0.00"/></td>
                            </tr>
                            <tr>
                                <td valign="top"><strong>Note:</strong></td>
                                <td colspan="11"> <textarea name="note" style="height:150px; resize:vertical; max-height:200px;"><?php echo $invoice['0']['note'];?></textarea>
                            	</td>
                            </tr>
                        </table>
                 	</td>
                 </tr>
            </table>
            
            
            <!--<div class="row">
            	<div class="col1">Penerimaan</div>
                <div class="col2"><input type="text" name="penerimaan" /> 
                	<div class="errorField"><?php /*echo form_error("penerimaan");*/?></div>
                </div>
			</div>-->
            <div id="hiddenGenerate"></div>
            <div class="title" align="right">
            	<input type="submit" name="btnSave" value="Save" class="button_red" /><!--<input type="submit" name="btnGener" value="Generate Pdf and Save" class="button_red" onclick="javascript:updateNoInvo(this.form)" />-->
            </div>
            
       
            <div class="success" id="sukses"><?php echo (isset($success))?$success:"";?>&nbsp;</div>
            <div class="errorField"><?php echo form_error("mataUang");?></div>
        </form>
        </div>
        
        <?php /*================================================================*/
		// add payterm
		?>
        
        <div id="dialog-form" title="Tambah Data Payment Terms">
    	<p class="validateTips">Harus diisi semua</p>
 
            <form>
            <fieldset>
                <label for="name">Hari</label>
                <input type="text" name="name" id="name" class="text ui-widget-content ui-corner-all" />
                <label for="email">Deskripsi</label>
                <input type="text" name="email" id="email" value="" class="text ui-widget-content ui-corner-all" />
                
            </fieldset>
            </form>
        </div>
 
         
       


		<?php /*================================================================*/
		// add delivery
		?>
     	<div id="dialog-form-deliv" title="Tambah Data Pengiriman">
        	Penambahan Untuk Customer: <div id="headDialog" class="headdiag"></div>
            Perusahaan: <div id="headDialog1" class="headdiag"></div>
    		<p class="validateTips-deliv">Harus diisi semua</p>
 
            <form>
            <fieldset>
            	<table width="100%">
                <tr>
                <td><label for="name-deliv">Nama</label></td>
                <td><input type="text" name="name-deliv" id="name-deliv" class="text ui-widget-content ui-corner-all" /></td>
                </tr>
                <tr>
                <td><label for="telp-deliv">No Telp</label></td>
                <td><input type="text" name="telp-deliv" id="telp-deliv" class="text ui-widget-content ui-corner-all" /></td>
                </tr>                
                <tr>
                <td><label for="fax-deliv">Fax</label></td>
                <td><input type="text" name="fax-deliv" id="fax-deliv"  class="text ui-widget-content ui-corner-all" /><td>
                </tr>
                <tr>
                <td><label for="alamat-deliv">Alamat</label></td>
                <td><input type="text" name="alamat-deliv" id="alamat-deliv"  class="text ui-widget-content ui-corner-all" /></td>
                </tr>
                <tr>
                <td><label for="rt-deliv">RT</label></td>
                <td><input type="text" name="rt-deliv" id="rt-deliv"  class="text ui-widget-content ui-corner-all" /></td>
                </tr>
                <td><label for="rw-deliv">RW</label></td>
                <td><input type="text" name="rw-deliv" id="rw-deliv"  class="text ui-widget-content ui-corner-all" /></td>
                <tr>
                <td><label for="kode-deliv">Kode Pos</label></td>
                <td><input type="text" name="kode-deliv" id="kode-deliv"  class="text ui-widget-content ui-corner-all" /></td>
               	</tr>
                <td><label for="kota-deliv">Kota</label></td>
                <td><input type="text" name="kota-deliv" id="kota-deliv"  class="text ui-widget-content ui-corner-all" /></td>
                <tr>
                <td><label for="provinsi-deliv">Provinsi</label></td>
                <td><input type="text" name="provinsi-deliv" id="provinsi-deliv"  class="text ui-widget-content ui-corner-all" /></td>											  				</tr>
                </table>
            </fieldset>
            </form>
        </div>
 
         
      
		<?php /* =================================================*/
        // add bill?>
		
     	<div id="dialog-form-bill" title="Tambah Data Penagihan">
        	Penambahan Untuk Customer: <div id="headDialogBill" class="headdiag"></div>
            Perusahaan: <div id="headDialog1Bill" class="headdiag"></div>
    		<p class="validateTips-bill">Harus diisi semua</p>
 
            <form>
            <fieldset>
            	<table width="100%">
                <tr>
                <td><label for="name-bill">Nama</label></td>
                <td><input type="text" name="name-bill" id="name-bill" class="text ui-widget-content ui-corner-all" /></td>
                </tr>
                <tr>
                <td><label for="telp-bill">No Telp</label></td>
                <td><input type="text" name="telp-bill" id="telp-bill" class="text ui-widget-content ui-corner-all" /></td>
                </tr>                
                <tr>
                <td><label for="fax-bill">Fax</label></td>
                <td><input type="text" name="fax-bill" id="fax-bill"  class="text ui-widget-content ui-corner-all" /><td>
                </tr>
                <tr>
                <td><label for="alamat-bill">Alamat</label></td>
                <td><input type="text" name="alamat-bill" id="alamat-bill"  class="text ui-widget-content ui-corner-all" /></td>
                </tr>
                <tr>
                <td><label for="rt-bill">RT</label></td>
                <td><input type="text" name="rt-bill" id="rt-bill"  class="text ui-widget-content ui-corner-all" /></td>
                </tr>
                <td><label for="rw-bill">RW</label></td>
                <td><input type="text" name="rw-bill" id="rw-bill"  class="text ui-widget-content ui-corner-all" /></td>
                <tr>
                <td><label for="kode-bill">Kode Pos</label></td>
                <td><input type="text" name="kode-bill" id="kode-bill"  class="text ui-widget-content ui-corner-all" /></td>
               	</tr>
                <td><label for="kota-bill">Kota</label></td>
                <td><input type="text" name="kota-bill" id="kota-bill"  class="text ui-widget-content ui-corner-all" /></td>
                <tr>
                <td><label for="provinsi-bill">Provinsi</label></td>
                <td><input type="text" name="provinsi-bill" id="provinsi-bill"  class="text ui-widget-content ui-corner-all" /></td>				 				</tr>
                </table>
            </fieldset>
            </form>
        </div>
 
         
      
		<?php /* =================================================*/?>
        
        
        
    </div>
</div>
<?php /* =================================================*/
        // add bill?>
		
     	<div id="dialog-form-barang" title="Pilih Barang">
        	<select name="jenisBarang" id="jenisBarang" onchange="javascript:invoJenisBarang1(
                                                        '#jenisBarang', '#tempatBarang', '0')">
                	<option value="" disabled="disabled" selected="selected">::: Select :::</option>
                    <option value="supir">Supir</option>
                    <option value="mobil">Mobil</option>
                    </select>
             <form>
            <fieldset>
            	
            	<div id="tempatBarang">
                	
                </div>
            </fieldset>
            </form>
        </div>
 
         
       
		<?php /* =================================================*/?>
<?php $this->load->view("general/footer");?>